package com.mathassistant.client.event.exercise;

import com.google.gwt.event.shared.GwtEvent;
import com.mathassistant.shared.TopicDTO;

public class ExerciseManagementUpdateEvent extends GwtEvent<ExerciseManagementUpdateEventHandler>{
	public static final Type<ExerciseManagementUpdateEventHandler> TYPE = new Type<ExerciseManagementUpdateEventHandler>();
	private TopicDTO topic;
	private int indexCurBegin;
	
	public ExerciseManagementUpdateEvent(TopicDTO topc, int indexCurBegin){
		this.topic = topc;
		this.indexCurBegin = indexCurBegin;
	}
	
	public TopicDTO getTopc(){
		return topic;
	}
	
	public int getIndexCurBeginList(){
		return indexCurBegin;
	}
	
	@Override
	public Type<ExerciseManagementUpdateEventHandler> getAssociatedType() {
		// TODO Auto-generated method stub
		return TYPE;
	}

	@Override
	protected void dispatch(ExerciseManagementUpdateEventHandler handler) {
		// TODO Auto-generated method stub
		handler.onUpdateListExercise(this);
	}

}
